/*
 *  Cero Project - Copyright   2006 The Cero Developement Team 
 *  (Michael Laguerre, Camille Roux, Matthieu Segret, Mathieu Sivade) 
 * 
 *  This program is free software; you can redistribute it and/or modify it 
 *  under the terms of the GNU General Public License as published by the Free 
 *  Software Foundation; either version 2 of the License, or (at your option) 
 *  any later version.
 * 
 *  This program is distributed in the hope that it will be useful, but 
 *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 *  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 
 *  for more details.
 */

package org.ceroproject.ui.graphical.tools.base;


import org.ceroproject.ui.graphical.tools.Rectangle;

/**
 * Class which draws a rectangle
 * 
 * @author Matt
 */

public class RectangleBase implements Rectangle {

	/* -------------- field ------------- */

	/** The rectangle's height */
	private int height;

	/** The rectangle's width */
	private int width;

	/** X-coordinate of the rectangle */
	private int x;

	/** Y-coordinate of the rectangle */
	private int y;

	/* ------------- Method ------------- */

	
	/**
	 * Return the coordinate of Rectangle
	 * 
	 * @return the coordinate of Rectangle
	 */
	public String toString(){
		return " ; X : " + getX() + " ; Y : " + getY() +
		" ; Height : " + getHeight() + " ; Width : " + getWidth();
	}
	
	/**
	 * Return the X-coordinate of the rectangle
	 * 
	 * @return the X-coordinate of the rectangle
	 */
	public int getX() {
		return x;
	}

	/**
	 * Set the X-coordinate of the Rectangle
	 * 
	 * @param x
	 *            the new X-coordinate of the rectangle
	 */
	public void setX(int x) {
		this.x = x;
	}

	/**
	 * Return the Y-coordinate of the rectangle
	 * 
	 * @return the Y-coordinate of the rectangle
	 */
	public int getY() {
		return y;
	}

	/**
	 * Set the Y-coordinate of the Rectangle
	 * 
	 * @param y
	 *            the new Y-coordinate of the rectangle
	 */
	public void setY(int y) {
		this.y = y;
	}

	/**
	 * Return the Rectangle's height
	 * 
	 * @return the Rectangle's height
	 */
	public int getHeight() {
		return height;
	}

	/**
	 * Set the Rectangle's height
	 * 
	 * @param height
	 *            the new Rectangle's height
	 */
	public void setHeight(int heigth) {
		this.height = heigth;
	}

	/**
	 * Return the Rectangle's width
	 * 
	 * @return the Rectangle's width
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * Set the Rectangle's width
	 * 
	 * @param height
	 *            the Rectangle's width
	 */
	public void setWidth(int width) {
		this.width = width;
	}
}

